<!--
*@Author: QWP
*@Description: 角色编辑
*@Date: 2023-06-29 17:03:08
-->
<template>
  <u-dialog v-bind="$attrs"
    
    @submit="submit">

    <u-busi-item title="" 
      icon="jbxx">
      <u-form :elements="elements" :model="form" ></u-form>
    </u-busi-item>

    <template slot="footer" v-if="isCheck == false">
      <u-ptype-button itype="delete">删除</u-ptype-button>
    </template>
  </u-dialog>
</template>
<script>
import { fileCols } from '@/common/model/fileCols.js'
export default {
  props: {
    isCheck: { type: Boolean, default: false}
  },
  data () {
    return {

      form: {},
      elements: [
        {element: 'select', label: '角色类型', span: 24, key: 'fkDeptId', required: true,
          data: [
            {id: '1', label: '系统管理'},
            {id: '2', label: '预算管理'},
            {id: '3', label: '财务管理'},
            {id: '3', label: '采购管理'},
          ], 
        },
        {element: 'input', label: '角色代码', span: 24, key: 'fkDeptId', disabled: true, required: true,},
        {element: 'input', label: '角色名称', span: 24, key: 'loginName', required: true,
          maxlength: "50",  'show-word-limit': true
        },
        {element: 'input', label: '备注', type: 'textarea', span: 24, key: 'remark',
          maxlength: "200",  'show-word-limit': true
        },
        {element: 'select', label: '是否启用',  span: 24, key: 'isUse', data: [{id: '0', label: '否'}, {id: '1', label: '是'}]},
      ],

    }
  },
  mounted() {},
  methods: {
    // 保存提交事件
    submit() {
      // 保存当前数据，保存成功则提示成功，并关闭本界面，刷新父级列表页面。
      // 保存时，判断界面必填项。
      // 保存时，判断角色名称唯一。
    },
  },
  watch: {

  }
}
</script>
<style lang='scss'>
</style>